= form_for(project, url: project_update_url, method: :patch, remote: true) do |form|
  %h5 Edit Project #{project}
  = hidden_field_tag(:id, project.id)
  .mb-3
    = form.label(:title, 'Title:')
    = form.text_field(:title, class: 'form-control', autofocus: true)
  .mb-3
    = form.label(:url, 'URL:')
    = form.text_field(:url, class: 'form-control')
  - if feature_enabled?('foster_collaboration')
    .mb-3
      = form.label(:report_bug_url, 'Report Bug URL:')
      = form.url_field(:report_bug_url, class: 'form-control')
  .mb-3
    = form.label(:anitya_distribution_name, 'Anitya Distribution Name:')
    = form.text_field(:anitya_distribution_name, class: 'form-control')
  .mb-3
    = form.label(:description, 'Description:')
    = render WriteAndPreviewComponent.new(form: form, preview_message_url: project_preview_description_path,
                                        message_body_param: 'project[description]',
                                        text_area_attributes: { rows: 8, placeholder: 'Write your description here... (Markdown markup is supported)',
                                        required: false, object_name: :description})
  .mb-3.text-end
    = link_to 'Cancel', project_show_path(project), class: 'cancel btn btn-outline-danger px-4', remote: true
    = submit_tag('Update', class: 'btn btn-primary px-4')
